package com.xzy.service.impl;

import com.xzy.entity.Content;
import com.xzy.mapper.ContentMapper;
import com.xzy.service.ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ContentServiceImpl implements ContentService {
    @Autowired
    private ContentMapper contentMapper;
    @Override
    public void addContent(Content content) {
        contentMapper.addContent(content);
    }

    @Override
    public List<Content> getContentByReport(int reportId) {
        return contentMapper.getAllContent(reportId);
    }

    @Override
    public Content getContent(int reportId, int serialNumber) {
        return contentMapper.getContent(reportId,serialNumber);
    }

    @Override
    public void deleteContents(int reportId) {
        contentMapper.deleteContents(reportId);
    }

    @Override
    public void deleteContent(int contentId) {
        contentMapper.deleteContent(contentId);
    }

    @Override
    public void updateContent(Content content) {
        contentMapper.updateContent(content);
    }

}
